
#include "pollServer.hpp"
#include <memory>
using namespace poll_ns;

static void usage(const string& proc)
{
    cerr<< "usage:\n\t" << proc << " port" << endl;
}
string transaction(const string& request)
{
    return request;
}
int main(int argv, char* argc[])
{
    if(argv != 2)
    {
        usage(argc[0]);
        exit(USAGE_ERR);
    }
    uint16_t port = atoi(argc[1]);
    unique_ptr<pollServer> ssvr(new pollServer(transaction, port));

    ssvr->initserver();
    ssvr->start();
    return 0;
}

